package com.edu.koudingmusic.tools;

import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethod;
import android.view.inputmethod.InputMethodManager;

import com.edu.koudingmusic.BaseApplication;

/**
 * Created by Ming on 2016/2/27.
 * email 1715944993@qq.com
 */
public class AppUtils {

    // 隐藏输入法
    public static void hideInputMethod(View view) {
        InputMethodManager manager = (InputMethodManager) BaseApplication.sContext
                .getSystemService(Context.INPUT_METHOD_SERVICE);

        if (manager.isActive()){
            manager.hideSoftInputFromWindow(view.getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
        }

    }
}
